Allow uppercase hex encoded entities in GPX.
authorrobertl <robertl>
Thu, 17 Jan 2008 02:25:14 +0000 (02:25 +0000)
committerrobertl <robertl>
Thu, 17 Jan 2008 02:25:14 +0000 (02:25 +0000)
gpx.c

diff --git a/gpx.c b/gpx.c
index 7e33d28714b52b9d3036070373e30927b838f5c3..20121117bbd7a8ab04bd6d7c59244e5fd2c2cea6 100644 (file)
--- a/gpx.c
+++ b/gpx.c
@@ -1355,11 +1355,12 @@ gpx_read(void)
                                        semi = strchr( badchar, ';' );
                                        if ( semi ) {
                                                while (*hexit && *hexit != ';') {
+                                                       char hc = isalpha(*hexit) ? tolower (*hexit) : *hexit;
                                                        val *= 16;
-                                                       val += strchr( hex, *hexit )-hex;
+                                                       val += strchr( hex, hc)-hex;
                                                        hexit++;
                                                }
-                                               
+
                                                if ( val < 32 ) {
                                                        warning( MYNAME ": Ignoring illegal character %s;\n\tConsider emailing %s at <%s>\n\tabout illegal characters in their GPX files.\n", badchar, gpx_author?gpx_author:"(unknown author)", gpx_email?gpx_email:"(unknown email address)" );
                                                        memmove( badchar, semi+1, strlen(semi+1)+1 );